#ifndef _AME_GAME_H_
#define _AME_GAME_H_

#define GAMEP(me, pos) (me->val+(pos))
#define GAMEB(me, pos) (*(unsigned char*)(me->val+(pos)))
#define GAMEW(me, pos) (*(unsigned short*)(me->val+(pos)))
#define GAMEL(me, pos) (*(unsigned int*)(me->val+(pos)))

struct sexec;
struct sexec  {
	int (*proc)(struct sexec *);
	void *val;
};

int parseQueue(struct chain_set *qset);
int qAdd(struct chain_set *q, unsigned int index, int (*proc)(struct sexec *), void *val);
void qShut (struct sexec *sex);
int q_mobAddMov(struct world_mob *mob, int x, int y);
int q_charAddMov(struct world_char *c, int x, int y);
int q_charParseMov(struct sexec *sex);
/* int qCharMove(struct sexec *sex); */
int qCloseFd(struct sexec *sex);
int qSendToChar(struct sexec *sex);
int qAddMsg(struct client *to,  const char *msg, int in);
int qSendPack(struct sexec *);
int qAddPack(struct client *, const char *, int, int);
int qMobDo(struct sexec *);
#endif
